package com.example.factory.absfactory.demo2;


import com.example.factory.absfactory.demo2.factory.AbstractMilkFactory;
import com.example.factory.absfactory.demo2.factory.MilkFactory;

/**
 * 抽象工厂测试类
 * @author zhoubin
 * @date 2019-10-20 17:38:03
 */
public class AbstractFactoryTest {

    public static void main(String[] args) {

        AbstractMilkFactory factory = new MilkFactory();
        System.out.println(factory.mengniuMilk("115"));
        System.out.println(factory.telunsuMilk("120"));

        // 新增的三鹿牛奶产品，用户需要的时候只需要关注 AbstractFactory，不需要关注具体怎么生产
        System.out.println(factory.sanluMilk("110"));

    }

}
